import 'package:flutter/material.dart';
import 'package:stage_app/constants/route_constant.dart';

class RouteUtil {
  static void goMain(BuildContext context) {
    pushReplacementNamed(context, RouteConstant.ROUTE_HOME);
  }

  static void goLogin(BuildContext context) {
    pushNamed(context, RouteConstant.ROUTE_LOGIN);
  }

  static void pushNamed(BuildContext context, String pageName) {
    Navigator.of(context).pushNamed(pageName);
  }

  static void pushReplacementNamed(BuildContext context, String pageName) {
    Navigator.of(context).pushReplacementNamed(pageName);
  }
}